package d.i;

import d.f.r;

public class a implements Iterable<Integer> {
    public static final C0105a e = new C0105a((a) null);

    /* renamed from: b  reason: collision with root package name */
    private final int f2701b;

    /* renamed from: c  reason: collision with root package name */
    private final int f2702c;

    /* renamed from: d  reason: collision with root package name */
    private final int f2703d;

    /* renamed from: d.i.a$a  reason: collision with other inner class name */
    public static final class C0105a {
        private C0105a() {
        }

        public /* synthetic */ C0105a(a aVar) {
            this();
        }

        public final a a(int i, int i2, int i3) {
            return new a(i, i2, i3);
        }
    }

    public a(int i, int i2, int i3) {
        if (i3 == 0) {
            throw new IllegalArgumentException("Step must be non-zero.");
        } else if (i3 != Integer.MIN_VALUE) {
            this.f2701b = i;
            this.f2702c = d.g.a.b(i, i2, i3);
            this.f2703d = i3;
        } else {
            throw new IllegalArgumentException("Step must be greater than Int.MIN_VALUE to avoid overflow on negation.");
        }
    }

    public final int a() {
        return this.f2701b;
    }

    public final int b() {
        return this.f2702c;
    }

    public final int c() {
        return this.f2703d;
    }

    /* renamed from: d */
    public r iterator() {
        return new b(this.f2701b, this.f2702c, this.f2703d);
    }

    public boolean equals(Object obj) {
        if (obj instanceof a) {
            if (!isEmpty() || !((a) obj).isEmpty()) {
                a aVar = (a) obj;
                if (!(this.f2701b == aVar.f2701b && this.f2702c == aVar.f2702c && this.f2703d == aVar.f2703d)) {
                    return false;
                }
            }
            return true;
        }
        return false;
    }

    public int hashCode() {
        if (isEmpty()) {
            return -1;
        }
        return (((this.f2701b * 31) + this.f2702c) * 31) + this.f2703d;
    }

    public boolean isEmpty() {
        if (this.f2703d > 0) {
            if (this.f2701b > this.f2702c) {
                return true;
            }
        } else if (this.f2701b < this.f2702c) {
            return true;
        }
        return false;
    }

    public String toString() {
        int i;
        StringBuilder sb;
        if (this.f2703d > 0) {
            sb = new StringBuilder();
            sb.append(this.f2701b);
            sb.append("..");
            sb.append(this.f2702c);
            sb.append(" step ");
            i = this.f2703d;
        } else {
            sb = new StringBuilder();
            sb.append(this.f2701b);
            sb.append(" downTo ");
            sb.append(this.f2702c);
            sb.append(" step ");
            i = -this.f2703d;
        }
        sb.append(i);
        return sb.toString();
    }
}
